﻿@{
    Layout = null;
}

<script src="~/Scripts/MGJJS/CodeManage/CodeRelate.js"></script>

<div class="mtlr15">
    <div class="row">
        <div class="col-lg-8 col-md-8 col-sm-8" style="padding:0">
            <button type="button" class="btn btn-success" onclick="$.MGJ.CodeRelate.Dialog_CodeDisableAdd()">
                码禁用
            </button>
        </div>

        <!--
            <div class="col-lg-4 col-md-4 col-sm-4">
            <div class="input-group">
                <input type="text" class="form-control" placeholder="请输入关联码" id="SearchKey">
                <span class="input-group-addon" onclick=" $.MGJ.LeadCode.Ajax_LeadCodePageList(1)">
                    <span class="glyphicon glyphicon-search"></span>
                </span>
            </div>
        </div>
            -->
    </div>

    <div id="Table">
        <div class="overflow">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        
                        <th>操作方式</th>
                        <th>码批次</th>
                        <th>起始码</th>
                        <th>结束码</th>
                        <th>禁用码数量</th>
                        <th>码状态</th>
                        @*<th style="max-width:100px;">关联产品批次</th>
                        <th style="max-width:100px;">关联产品</th>*@
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="PageList" binding="{'pageId':'CodeRelatePager','pageCallback':'$.MGJ.CodeRelate.Ajax_GetCodeRelatePageList','emptyHtml':CodeRelate_EmptyHtml}">
                    <tr>
                       
                        <td class="RelateType" binding="{'text':'RelateType','textHandle':$.MGJ.CodeRelate.AllotTypeName}"></td>
                        <td class="CodeBatch" binding="{'text':'CodeBatch'}" style="max-width:100px;"></td>
                        <td class="StartCode" binding="{'text':'StartCode'}" style="max-width:100px;"></td>
                        <td class="EndCode" binding="{'text':'EndCode'}" style="max-width:100px;"></td>
                        <td class="RelateCodeNums" binding="{'text':'RelateCodeNums'}"></td>
                        @*<td style="max-width:100px;" binding="{'text':'BatchName','title':'BatchName'}"></td>
            <td style="max-width:100px;" binding="{'text':'ProductName','title':'ProductName'}"></td>*@

                        <td class="Status" binding="{'text':'Status','textHandle':$.MGJ.CodeRelate.Ajax_Stats}"></td>
                        <td binding="{'text':'ChangeDate','textHandle':'datetime'}"></td>
                        <td style="display:none;" class="BoxCodes" binding="{'text':'WL_CodeDisable'}" />
                        <td binding="{'text':'Status','textHandle':$.MGJ.CodeRelate.StatsButton}">
                            <a onclick="$.MGJ.CodeRelate.Dialog_CodeDisableCheck(this)">查看</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="CodeRelatePager"></div>
    </div>
</div>

<script>

    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.CodeRelate_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    $(function () {
        $.MGJ.CodeRelate.Ajax_GetCodeRelatePageList(1,1);
    });
</script>
